const koa = require('koa')
const views= require('koa-views')
const path = require('path')
const app = new koa()

let fullpath = path.resolve(__dirname,'./views')

app.use(views(fullpath,{
  extension:"ejs"
}))

app.use(async (ctx) => {

 await ctx.render('index',{
    title:"vip8"
  })

})

app.listen(3000, () => {
  console.log('localhost:3000 start..')
})